﻿@model RTracker.Models.Organization.GOrganization

@{
    ViewBag.ValidatorCls = "validTxtCls";
    var IsDisabled = "";
    var DefaultClass = "gd-disabled-cls";
    if (ViewBag.IsDisabled == true && Model.Organization.OrganizationId != 0)
    {
        IsDisabled = "disabled";
    }
}


<form id="frm" class="form-horizontal mnt_form">
    <div class="form-body">
        @Html.HiddenFor(model => model.Organization.OrganizationId)
        @Html.HiddenFor(model => model.Organization.CreatedBy)
        @Html.HiddenFor(model => model.Organization.OrganizationId)

        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">@Html.DisplayNameFor(model => model.Organization.OrganizationName)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled class="@ViewBag.ValidatorCls form-control @IsDisabled"
                               name="@Html.NameFor(model => model.Organization.OrganizationName)"
                               placeholder="Enter @Html.DisplayNameFor(model => model.Organization.OrganizationName)"
                               value="@(!Model.Organization.OrganizationName.Trim().Equals(string.Empty) ? Model.Organization.OrganizationName : "")">
                    </div>
                </div>
            </div>
            <!--/span-->
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">@Html.DisplayNameFor(model => model.Organization.Address)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled class="@ViewBag.ValidatorCls form-control @IsDisabled"
                               name="@Html.NameFor(model => model.Organization.Address)"
                               placeholder="Enter @Html.DisplayNameFor(model => model.Organization.Address)"
                               value="@(!Model.Organization.Address.Trim().Equals(string.Empty) ? Model.Organization.Address : "")">
                    </div>
                </div>
            </div>
            <!--/span-->
        </div>
        <!--/row-->
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">@Html.DisplayNameFor(model => model.Organization.State)</label>
                    <div class="col-md-9">
                        <select @IsDisabled class="@ViewBag.ValidatorCls form-control @IsDisabled"
                                name="@Html.NameFor(model => model.Organization.State)">
                            <option value="Punjab">Punjab</option>
                            <option value="Haryana">Haryana</option>
                        </select>
                    </div>
                </div>
            </div>
            <!--/span-->
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">@Html.DisplayNameFor(model => model.Organization.City)</label>
                    <div class="col-md-9">
                        <select @IsDisabled class="@ViewBag.ValidatorCls form-control @IsDisabled"
                                name="@Html.NameFor(model => model.Organization.City)">
                            <option value="Mohali">Mohali</option>
                            <option value="Sonipat">Sonipat</option>
                        </select>
                    </div>
                </div>
            </div>
            <!--/span-->
        </div>
        <!--/row-->
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">@Html.DisplayNameFor(model => model.Organization.Zip)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled class="@ViewBag.ValidatorCls form-control @IsDisabled"
                               name="@Html.NameFor(model => model.Organization.Zip)"
                               placeholder="Enter @Html.DisplayNameFor(model => model.Organization.Zip)"
                               value="@(!Model.Organization.Zip.Trim().Equals(string.Empty) ? Model.Organization.Zip : "")">
                    </div>
                </div>
            </div>
            <!--/span-->
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">@Html.DisplayNameFor(model => model.Organization.WebSite)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled class="@ViewBag.ValidatorCls form-control @IsDisabled"
                               name="@Html.NameFor(model => model.Organization.WebSite)"
                               placeholder="Enter @Html.DisplayNameFor(model => model.Organization.WebSite)"
                               value="@(!Model.Organization.WebSite.Trim().Equals(string.Empty) ? Model.Organization.WebSite : "")">
                    </div>
                </div>
            </div>
            <!--/span-->
        </div>



        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">@Html.DisplayNameFor(model => model.Organization.PrimaryEmail)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled class="@ViewBag.ValidatorCls form-control @IsDisabled"
                               name="@Html.NameFor(model => model.Organization.PrimaryEmail)"
                               placeholder="Enter @Html.DisplayNameFor(model => model.Organization.PrimaryEmail)"
                               value="@(!Model.Organization.PrimaryEmail.Trim().Equals(string.Empty) ? Model.Organization.PrimaryEmail : "")">
                    </div>
                </div>
            </div>
            <!--/span-->
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">@Html.DisplayNameFor(model => model.Organization.SecondaryEmail)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled class="@ViewBag.ValidatorCls form-control @IsDisabled"
                               name="@Html.NameFor(model => model.Organization.SecondaryEmail)"
                               placeholder="Enter @Html.DisplayNameFor(model => model.Organization.SecondaryEmail)"
                               value="@(!Model.Organization.SecondaryEmail.Trim().Equals(string.Empty) ? Model.Organization.SecondaryEmail : "")">
                    </div>
                </div>
            </div>
            <!--/span-->
        </div>

        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="control-label col-md-3">Upload</label>
                    <div class="col-md-9">
                        @*<span class="btn green fileinput-button">
                            <i class="fa fa-plus"></i>
                            <span>
                                Add files...
                            </span>*@
                        <input type="file" @IsDisabled multiple="" name="files[]" >
                        @*</span>*@
                    </div>
                </div>
            </div>
            <div class="clear-fix"></div>
        </div>

        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="col-md-3 control-label">@Html.DisplayNameFor(model => model.Organization.CreatedByName)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled placeholder="Enter Text" class="form-control @DefaultClass"
                               name="@Html.NameFor(model => model.Organization.CreatedByName)"
                               value="@(!Model.Organization.CreatedByName.Trim().Equals(string.Empty) ? Model.Organization.CreatedByName : "")" disabled>
                    </div>
                </div>
            </div>

            <div class="col-md-6">
                <div class="form-group">
                    <label class="col-md-3 control-label">@Html.DisplayNameFor(model => model.Organization.CreateTimestamp)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled placeholder="dd-mm-yyyy" class="form-control @DefaultClass"
                               value="@(!Model.Organization.CreateTimestamp.ToString().Trim().Equals(string.Empty) ? Model.Organization.CreateTimestamp.ToString() : "")" disabled>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label class="col-md-3 control-label">@Html.DisplayNameFor(model => model.Organization.ModifiedByName)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled placeholder="Enter Text" class="form-control @DefaultClass"
                               name="@Html.NameFor(model => model.Organization.ModifiedByName)"
                               value="@(!Model.Organization.ModifiedByName.Trim().Equals(string.Empty) ? Model.Organization.ModifiedByName : "")" disabled>
                    </div>
                </div>
            </div>

            <div class="col-md-6">
                <div class="form-group">
                    <label class="col-md-3 control-label">@Html.DisplayNameFor(model => model.Organization.ModifiedTimestamp)</label>
                    <div class="col-md-9">
                        <input type="text" @IsDisabled placeholder="dd-mm-yyyy" class="form-control @DefaultClass"
                               value="@(!Model.Organization.ModifiedTimestamp.ToString().Trim().Equals(string.Empty) ? Model.Organization.ModifiedTimestamp.ToString() : "")" disabled>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
    <div class="form-actions fluid right">
        <div class="col-md-12">
            @if (ViewBag.IsNew == false)
            {
                <img style="float:left" src="~/Content/Images/hardLock_closedx50.png" title="Set Lock" alt="" id="btn-setHardLock-id" value="@Model.Organization.OrganizationId" class="cursor-pointer-cls @(Model.Organization.IsHardLocked ? "gd-disabled-cls" : "" ) " @ViewBag.StrDisabled />
                <img style="float:left" src="~/Content/Images/hardLock_openx50.png" title="Release Lock" alt="" id="btn-releaseHardLock-id" value="@Model.Organization.OrganizationId" class="cursor-pointer-cls @(!Model.Organization.IsHardLocked ? "gd-disabled-cls" : "") " @ViewBag.StrDisabled />
            }
            <img src="~/Content/Images/cancel.png" @ViewBag.StrDisabled id="btn-cancel-id" class="cursor-pointer-cls" />
            <img src="~/Content/Images/save.png" @ViewBag.StrDisabled id="btn-Save-id" class="cursor-pointer-cls" />
        </div>
    </div>
</form>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

